﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeBehind="ChucVuGiaoVien.aspx.cs" Inherits="WTSQCB.ChucVuGiaoVien" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        &nbsp;
        Chức vụ giáo viên</p>
    <p>
        &nbsp;
        Chọn chức vụ:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:DropDownList ID="ChucVuddl" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="TenChucVu" DataValueField="MaChucVu">
        </asp:DropDownList>
    </p>
    <p>
        <asp:GridView ID="CTChucVudgv" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="MaGiaoVien,MaChucVu" DataSourceID="SqlDataSource2" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" Width="980px">
            <Columns>
                <asp:CommandField ButtonType="Button" SelectText="CHỌN" ShowSelectButton="True" />
                <asp:BoundField DataField="MaGiaoVien" HeaderText="Mã giáo viên" ReadOnly="True" SortExpression="MaGiaoVien" />
                <asp:BoundField DataField="TenGiaoVien" HeaderText="Tên giáo viên" SortExpression="TenGiaoVien" />
                <asp:BoundField DataField="MaChucVu" HeaderText="Mã chức vụ" ReadOnly="True" SortExpression="MaChucVu" />
                <asp:BoundField DataField="TenChucVu" HeaderText="Tên chức vụ" SortExpression="TenChucVu" />
                <asp:BoundField DataField="NgayNhanChuc" HeaderText="Ngày nhận chức" ReadOnly="True" SortExpression="NgayNhanChuc" />
            </Columns>
            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
            <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
            <RowStyle BackColor="White" ForeColor="#003399" />
            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
            <SortedAscendingCellStyle BackColor="#EDF6F6" />
            <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
            <SortedDescendingCellStyle BackColor="#D6DFDF" />
            <SortedDescendingHeaderStyle BackColor="#002876" />
        </asp:GridView>
    </p>
    <p>
        &nbsp;
        <asp:Button ID="Thembtn" runat="server" OnClick="Thembtn_Click" Text="THÊM" Width="80px" />
        &nbsp;
        <asp:Button ID="Suabtn" runat="server" OnClick="Suabtn_Click" Text="SỬA" Width="80px" />
        &nbsp;
        <asp:Button ID="Xoabtn" runat="server" OnClick="Button3_Click" Text="XÓA" Width="80px" />
    </p>
    <p>
        &nbsp;
        Mã giáo viên:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="MaGiaoVientxt" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="MaGiaoVientxt" ErrorMessage="RequiredFieldValidator" ForeColor="Red">*</asp:RequiredFieldValidator>
    </p>
    <p>
        &nbsp;
        Nhận chức Ngày:&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:DropDownList ID="NgayBDddl" runat="server">
        </asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tháng:&nbsp;&nbsp;&nbsp;&nbsp; <asp:DropDownList ID="ThangBDddl" runat="server">
        </asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Năm:&nbsp;&nbsp;&nbsp;&nbsp; <asp:DropDownList ID="NamBDddl" runat="server">
        </asp:DropDownList>
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WebDiemTSQCBConnectionString %>" SelectCommand="SELECT * FROM [ChucVu]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:WebDiemTSQCBConnectionString %>" SelectCommand="CTChucVuLoad" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:ControlParameter ControlID="ChucVuddl" Name="machucvu" PropertyName="SelectedValue" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
</asp:Content>
